<template>
	<view class="content">
		<!-- 首页导航栏 -->
		<view class="top-bar">
			<view class="top-bar-left">
				<image src="../../static/images/img/one.jpg"></image>
			</view>
			<view class="top-bar-center">
				<image src="../../static/images/index/logo.png"></image>
			</view>
			<view class="top-bar-right">
				<view class="search">
					<image src="../../static/images/index/search.png"></image>
				</view>
				<view class="add">
					<image src="../../static/images/index/add.png"></image>
				</view>
			</view>
		</view>
		<!-- 首页列表页 -->
		<view class="main">
			<view class="friends">
					<view class="friend-list">
						<view class="friend-list-l">
							<text class="tip">1</text>
							<image src="../../static/images/index/apply.png"></image>
						</view>
						<view class="friend-list-r">
							<view class="top">
								<view class="name">好友申请</view>
								<view class="time">13:14</view>
							</view>
							<view class="info">茫茫人海，相逢便是缘分</view>
						</view>
					</view>
				</view>
				<view class="friends">
					<view class="friend-list">
						<view class="friend-list-l">
							<text class="tip">1</text>
							<image src="../../static/images/img/two.jpg"></image>
						</view>
						<view class="friend-list-r">
							<view class="top">
								<view class="name">筛滤淘</view>
								<view class="time">13:14</view>
							</view>
							<view class="info">大家好，我来了。非常高兴在这里和大家见面。哈哈哈哈哈哈哈哈哈哈哈</view>
						</view>
					</view>
				</view>
			</view>	
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.content {
		// display: flex;
		// flex-direction: column;
		// align-items: center;
		// justify-content: center;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 200rpx;
		// border-bottom: $uni-border-color;
		// border-bottom: red;
	}

	.top-bar {
		// 位置一直固定在上面的
		display: flex;
		z-index: 999;
		justify-content: space-between;
		align-items: center;
		// position: fixed;
		height: 88rpx;
		background: $uni-bg-color;
		// background: red;
		box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
		// border-bottom: red;
		// border-bottom: $uni-border-color;
		padding-left: $uni-spacing-col-base;
		box-sizing: border-box;

		.top-bar-left {
			// float:left;
			image {
				width: 68rpx;
				height: 68rpx;
				vertical-align: middle;
				border-radious: 16rpx;
			}
		}

		.top-bar-center {

			// background-color: pink;
			image {
				width: 88rpx;
				height: 42rpx;
			}
		}

		.top-bar-right {
			display: flex;
			// float:right;
			padding-right: 14rpx;

			.search {
				display: flex;
				align-items: center;
				justify-content: center;
				// display: inline-block;
				// border: 1px solid red;
				width: 88rpx;
				height: 88rpx;

				// vertical-align: middle;
				// text-align: center;
				image {
					vertical-align: middle;
					text-align: center;
				}
			}

			.add {
				display: flex;
				align-items: center;
				justify-content: center;
				// display: inline-block ;
				// border: 1px solid red;
				width: 88rpx;
				height: 88rpx;
			}

			image {
				width: 52rpx;
				height: 52rpx;
			}
		}
	}

	.main {
		padding: 12rpx $uni-spacing-col-base 0;
		border: 1px solid red;

		.friend-list {
			height: 96rpx;
			padding: 16rpx 0;
			.friend-list-l {
				position: relative;
				float: left;
				image {
					width: 96rpx;
					height: 96rpx;
					border-radius: $uni-border-radius-base;
					background-color: $uni-color-primary;
				}

				.tip {
					position: absolute;
					z-index: 10;
					top: -6rpx;
					left: 68rpx;
					min-width: 36rpx;
					height: 36rpx;
					background-color: red;
					// background: rbga(255,93,91,1);
					// background:$uni-color-warning;
					// 它不起作用，不知道为什么
					border-radius: $uni-border-radius-circle;
					font-size: $uni-font-size-sm;
					color: $uni-text-color-inverse;
					line-height: 36rpx;
					text-align: center;
				}
			}

			.friend-list-r {
				padding-left: 128rpx;

				.top {
					height: 50rpx;

					.name {
						float: left;
						font-size: 36rpx;
						color: $uni-text-color;
						line-height: 50rpx;
					}

					.time {
						float: right;
						font-size: #uni-font-size-sm;
						color: $uni-text-color-disable;
						line-height: 50rpx;
					}
				}

				.info {
					font-size: $uni-font-size-base;
					color: $uni-text-color-grey;
					line-height: 40rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
			}
		}
	}
</style>
